package com.neusoft.resturant.service.impl;

import com.neusoft.resturant.entity.ResCollect;
import com.neusoft.resturant.mapper.ResCollectMapper;
import com.neusoft.resturant.service.IResCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @program: resturant
 * @description:
 * @author: lydms
 * @create: 2023-12-15 21:54
 **/


@Service
public class ResCollectServiceImpl implements IResCollectService {

    @Autowired
    private ResCollectMapper resCollectMapper;

    @Override
    public List<ResCollect> selectResCollectList(ResCollect resCollect) {
        return resCollectMapper.selectResCollectList(resCollect);
    }

    @Override
    public void addCollect(ResCollect resCollect) {

        resCollect.setCreateTime( new Date(System.currentTimeMillis()));
       resCollectMapper.addResCollect(resCollect);
    }

    @Override
    public void deleteResCollectByIds(Long[] ids) {
        resCollectMapper.deleteResCollectByIds(ids);
    }
}